From 6769db160db9b8bcfc1af3f51f54b6a49c701dfa Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 3 Oct 2019 06:49:32 +0200 Subject: [PATCH] icontheme: Don't try to scale pixbufs to 0px Always insist on at least 1px, even if the thumbnail we're turning into an icon was 256 * 3 and should be scaled to 32 * 3/8. --- gtk/gtkicontheme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index d56b9776bb..8a580fb4ac 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3497,8 +3497,8 @@ icon_info_ensure_scale_and_texture (GtkIconInfo *icon_info) else { GdkPixbuf *scaled = gdk_pixbuf_scale_simple (source_pixbuf, - 0.5 + image_width * icon_info->scale, - 0.5 + image_height * icon_info->scale, + MAX (1, 0.5 + image_width * icon_info->scale), + MAX (1, 0.5 + image_height * icon_info->scale), GDK_INTERP_BILINEAR); icon_info->texture = gdk_texture_new_for_pixbuf (scaled); g_object_unref (scaled); -- 2.30.2